#ifndef __FUNCTION_H
#define __FUNCTION_H

#include <stdio.h>
#include <string.h>
#include <malloc.h>

/* syntax of a felix function:

for a one-liner:
	<funct name>(<args>) := <cmd name>(<args>)
for a proper function:
	<funct name>(<args>) :=
		<cmd name>(<args>)
		...
		return <value or var name>
	}
*/

typedef struct _function
{
	char *name;
	char *arg[32];
	enum
	{
			oneline,
			multiline
	} kind;
	int startline;
	int stopline;
} _function;
typedef _function *function;

function getOneFunct(char *line);
function getMultiFunct(char *line, int start, int end);

#endif
